<script lang="ts" setup>
import * as THREE from "three";

//创建一个三维场景
const scene = new THREE.Scene();

//创建一个相机 视点
const camera = new THREE.PerspectiveCamera(45, window.innerWidth / window.innerHeight, 1, 1000);

//设置相机的位置
camera.position.set(0, 0, 20);


//创建一个渲染器
const renderer = new THREE.WebGLRenderer();

//设置渲染器尺寸
renderer.setSize(window.innerWidth, window.innerHeight);


</script>
<template>
  <div id="my-three"></div>
</template>

<style lang="scss" scoped>
body {
  margin: 0;
  padding: 0;
}
</style>
